#include <bits/stdc++.h>
using namespace std;
using uint=unsigned int;
using ll=long long;
using ull=unsigned long long;
using i128=__int128;
const int N=1e6+5;

void solve(){
    int n,m,q,u,v,t;
    cin>>n>>m>>q>>u>>v>>t;
    int time=1;
    vector<int> a(n);
    queue<int> qu[3];
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    sort(a.begin(),a.end());
    for(int i=n-1;i>=0;i--){
        qu[0].push(a[i]);
    }
    while(time<=m){
        int pos=0;
        int max=INT_MIN;
        for(int i=0;i<3;i++){
            if(!qu[i].empty()&&qu[i].front()>max){
                max=qu[i].front();
                pos=i;
            }
        }
        int len=qu[pos].front()+(time-1)*q;
        qu[pos].pop();
        if(time%t==0)cout<<len<<" ";
        int l=len*((double)u/v);
        int r=len-l;
        qu[1].push(l-q*time);
        qu[2].push(r-q*time);
        time++;
    }
    cout<<endl;
    int number=1;
    while(qu[0].size()||qu[1].size()||qu[2].size()){
        int pos=0;
        int max=INT_MIN;
        for(int i=0;i<3;i++){
            if(!qu[i].empty()&&qu[i].front()>max){
                max=qu[i].front();
                pos=i;
            }
        }
        if(number%t==0)cout<<qu[pos].front()+m*q<<" ";
        qu[pos].pop();
        number++;
    }
    
    return;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    solve();

    return 0;
}